<?php include("connect.php");?>
<?php
$uname = $_REQUEST["username"];
$pwd = $_REQUEST["password"];
$page = $_REQUEST["page"];

$sql = "SELECT user_id FROM M_USER WHERE JCU_ID = ". $uname;
if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
$retval = mysql_query($sql);
while($row = mysql_fetch_array($retval))
{
	$uid = $row['user_id'];
}
$_SESSION["userid"]=$uid;

if(isset($_SESSION["userid"]))
{
?>

<script type="text/javascript">
<!--
window.location = "<?php echo $page.".php"; ?>"
//-->
</script>

<?php }else
{
echo "put wrong number";
}

?>